﻿using System.Linq.Expressions;
using Basic.WxApiRemoteModel;
using Basic.WxModel.DB;
using Basic.WxModel.PlatformBind;

namespace Basic.WxRepository
{
    public interface IWxPlatformBindRepository : IWxBasicRepository<DBWxPlatformBind, long>
    {
        Result[] GetBinds<Result> (string wxAppId, Expression<Func<DBWxPlatformBind, Result>> selector);
        void Add (WxPlatformBindAdd add);
        void Cancel (long id);
        T Find<T> (string appId, string wxAppId) where T : class, new();

        long FindId (string appId, string wxAppId);
        void SetRefreshToken (long id, string refresh_token);
        void Set (long id, string refreshToken, WxPrower[] prowers);
        void SetPrower (long id, WxPrower[] prowers);
    }
}